home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Dr. Windows 3
/
dr win3.zip
/
dr win3
/
PVDRIVER
/
GSWINGUI.ZIP
/
GSWINGUI.TXT
< prev
next >
Wrap
Text File
|
1993-03-16
|
8KB
|
223 lines
Command Line Graphical User Interface
for
Ghostscript for Windows
Version 1.0
March 1993
Abstract:
---------
The accompanying software is a MS Windows program. It makes the use of
Ghostscript for Windows more convenient.
About Postscript & Ghostscript:
-------------------------------
Ghostscript for Windows is a MS Windows version of Ghostscript, a Postscript
interpreter, from Aladdin Enterprises, Copyright 1989, 1992. It is
distributed by the Free Software Foundation, Inc. Ghostscript can be
downloaded from various sites on the Internet, and some BBS's.
Ghostscript was originally used on UNIX systems, but has been ported to the
PC. There are PC, 386 PC, and MS Windows versions available.
Postscript is a "Page Description Language" used in Desktop Publishing by
high-end systems, and printed on Postscript Printers, the high end of
laser printers. It is also used by commercial printers.
Ghostscript allows the Postscript output of various programs to be viewed
on computer screens, converted to image files, and printed on inexpensive
printers. As freely distributable software, is an incredible piece of work.
To use this Command Line GUI software you will need:
A 386 or better PC with enough memory
MS Windows 3.1 running Enhanced Mode
Ghostscript 2.5.2 for Windows gs252win.zip
Ghostscript ini files gs252ini.zip
Ghostscript font files 24*.zip & 25*.zip
This software gswingui.zip
The Visual Basic DLL file vbrun100.dll
The Command Line GUI for MS Windows:
------------------------------------
The present piece of software was created to make the use of Ghostscript for
Windows convenient. The Windows version of Ghostscript (GS) is similar
to the DOS and UNIX versions. It will output graphics to a separate window
in the MS Windows version, and take advantage of a 256 colour display
if you have one.
Unless you know Postscript programming, you may find using Ghostscript
awkward, especially since the GS documentation is very brief. GS can
be used conveniently if it is launched with command line parameters.
However, using command line parameters is a bit difficult under MS Windows
so I wrote a program in Visual Basic to make it easier.
The program has file browsing tools to let you move through subdirectories
looking for your Postscript files. You can click on one file to enter it
into the command line, which you can see on the yellow horizontal bar.
You can click command buttons or manually enter for the file search pattern,
in order to look for *.ps, *.eps, *.grp, or other files.
I have also included a command button to bring up the notepad program of
MS Windows in order to manually edit your selected Postscript file, if it
is not too long for notepad. Use this feature carefully.
There are command buttons for some of the alternative resolutions (available
resolutions are printer dependent). Other resolutions can be manually entered
into the command line.
The are list boxes for selecting output devices and output destinations
(screen, printer, or file). Some of the device/destination combinations are
incompatible and are not selectable.
There is an [Upper PS to 640x480 Image] button to create an image of the
upper part of a PS page inside a 640x480 screen image or gif file. The
image is enlarged (margins are clipped) so the command will not be satisfactory
for all Postscript files. I created this option in order to get output from
certain commercial software into a gif file. You will have to edit the
uppr_gif.ps and uppr_scr.ps files in order to change the magnification and
position on the page. Use trial and error, or expertise.
There is a [-q -dNOPAUSE] button for "production runs" and a [ Make Portrait ]
button to shift a landscape picture into a reduced size portrait orientation.
(The port_*.ps routines need improvement by someone who knows Postscript
programming.)
The [ Execute... ] button launches Ghostscript for Windows with the command
line parameters displayed in the text box. If the line is too long for DOS,
it will have to be shortened. One way is to output to a file in the C:\
directory or in the default directory. Another is to use the @filename
facility described in the Ghostscript documentation.
Note that GS can convert Postscript files into *.gif files of stated resolution
or image dimensions.
The [ RESET ] button returns to the starting condition of the interface
program.
Installation:
-------------
You will need the Visual Basic DLL file vbrun100.dll in your Windows
directory in order to use the interface. This file is freely distributable
and can be found on the Internet and many BBS's.
Unzip this interface software into a subdirectory... I suggest C:\GSCRIPT.
Unzip Ghostscript for Windows and its support files into this same
directory (e.g. C:\GSCRIPT).
Set up the following environment variable in your AUTOEXEC.BAT file. Enter
this line into AUTOEXEC.BAT:
SET GS_LIB=C:\GSCRIPT
or substitute whatever subdirectory you have chosen. (If you don't know what
I am talking about, get help!)
Bring up MS Windows. Under the Program Manager menu system, select File,New
and install a new program item into your Applications program group. The
program is:
c:\gscript\vb_gs.exe
and also set the working directory to C:\GSCRIPT (assuming this is the
subdirectory you have chosen.
You may wish to use your own icon.
Run the program in the usual way. Hit the [Execute Ghostscript Command Line]
button to launch Ghostscript with whatever parameters you have chosen.
You can also use Ghostscript interactively if you know how. There are a few
suggestions in the GS documentation - read it (use.doc and others).
To quit, type quit into the Ghostscript interactive session.
Hints:
------
When GS for Windows generates a screen image, it is in a Form called
Ghostscript Image. You can click this icon to full size to see the
image being generated.
The Ghostscript Image will display when done, anyway. It can be sent to
the Windows Clipboard once displayed.
The image size can be user set with the -r parameter (pixels per inch) or
by setting the image size with -g (see the GS documentation).
*.PS Files:
-----------
There are six accompanying PS files here.
The port_*.ps files when used with the -g640x480 parameter should turn a
landscape picture upright and fit it in a 640x480 image. For printers the
portrait mode was set up to work with 300 DPI printers. Other aspect ratios may
not work. There is probably a better way to do this. The proportions are
about right, but not exactly right.
The uppr_scr.ps and uppr_gif.ps files when used with the -g640x480 parameter
give a slightly enlarged view of the upper part of a Postscript page. They
were written for output to screen or gif file.
The seefonts.ps program is based on the one in the GS distribution
and will show some selected fonts.
Final Notes:
------------
This program was written with Visual Basic for Windows ver. 1.0. You will
need the vbrun100.dll file in your Windows directory in order to run it. This
file can be found on Internet sites or on many BBS's.
This program is freely distributable. It is not to be sold.
Use at your own risk. I accept no responsibilities for its use,
inability to use, damages, or consequential damages, etc., etc., etc.
Peter Budgell, March 1993. peter@engrg.uwo.ca